package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * ResRelation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "RES_RELATION")
public class ResRelation implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 7581496118946810239L;

    // Fields 
    private Long id;
    private Long startId;
    private Long endId;
    private Long relationTypeId;
    private String label;

    // Constructors

    /** default constructor */
    public ResRelation() {
    }

    /** minimal constructor */
    public ResRelation(Long id) {
        this.id = id;
    }

    /** full constructor */
    public ResRelation(Long id, Long startId, Long endId, Long relationTypeId, String label) {
        this.id = id;
        this.startId = startId;
        this.endId = endId;
        this.relationTypeId = relationTypeId;
        this.label = label;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "RES_RELATION_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "START_ID", precision = 18, scale = 0)
    public Long getStartId() {
        return this.startId;
    }

    public void setStartId(Long startId) {
        this.startId = startId;
    }

    @Column(name = "END_ID", precision = 18, scale = 0)
    public Long getEndId() {
        return this.endId;
    }

    public void setEndId(Long endId) {
        this.endId = endId;
    }

    @Column(name = "RELATION_TYPE_ID", precision = 18, scale = 0)
    public Long getRelationTypeId() {
        return this.relationTypeId;
    }

    public void setRelationTypeId(Long relationTypeId) {
        this.relationTypeId = relationTypeId;
    }

    @Column(name = "LABEL", length = 64)
    public String getLabel() {
        return this.label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String toString() {
        return "ResRelation [id=" + id + ", startId=" + startId + ", endId=" + endId + ", relationTypeId=" + relationTypeId + ", label=" + label + "]";
    }

}